package com.lt.flashcard.model.entity;

import java.util.Date;

import org.bson.types.ObjectId;

import com.google.code.morphia.annotations.Entity;
import com.google.code.morphia.annotations.Id;

@Entity("activity")
public class Activity {

	@Id
	private ObjectId id;
	/**
	 * Store the full message for this activity
	 */
	private String message = "";
	/**
	 * The time that happens this activity
	 */
	private Date created = new Date();
	/**
	 * The type of this activity
	 */
	private int type = TYPE_BUY;
	/**
	 * Buy a product of blueup
	 */
	public final static int TYPE_BUY = 0;
	/**
	 * Create a new flashcardset
	 */
	public final static int TYPE_CREATESET = 1;
	/**
	 * Get a new item in journey
	 */
	public final static int TYPE_GETITEM = 2;
	/**
	 * Get a new medal in journey
	 */
	public final static int TYPE_GETMEDAL = 3;
	public final static int TYPE_BEGINJOURNEY = 4;
	public final static int TYPE_FINISHJOURNEY = 5;
	public final static int TYPE_MAKEFRIEND = 6;
	
	private Long uid = null;
	private String username = "";
	private String avatar = "";
	
	private Long targetuid = null;
	private Long relatedid = null;
	
	public ObjectId getId() {
		return id;
	}
	
	public void setId(ObjectId id) {
		this.id = id;
	}
	
	public String getMessage() {
		return message;
	}
	
	public void setMessage(String message) {
		this.message = message;
	}
	
	public Date getCreated() {
		return created;
	}
	
	public void setCreated(Date created) {
		this.created = created;
	}
	
	public int getType() {
		return type;
	}
	
	public void setType(int type) {
		this.type = type;
	}
	
	public Long getUid() {
		return uid;
	}
	
	public void setUid(Long uid) {
		this.uid = uid;
	}
	
	public String getUsername() {
		return username;
	}
	
	public void setUsername(String username) {
		this.username = username;
	}
	
	public String getAvatar() {
		return avatar;
	}
	
	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}
	
	public Long getTargetuid() {
		return targetuid;
	}
	
	public void setTargetuid(Long targetuid) {
		this.targetuid = targetuid;
	}
	
	public Long getRelatedid() {
		return relatedid;
	}
	
	public void setRelatedid(Long relatedid) {
		this.relatedid = relatedid;
	}
}
